<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
</html>
<script>
//初始化一个对象   属性:值   key:value
    var p1={
            'name':'华为手机',
            color:'red',
            size:'16寸',
            send:function(){   console.log('打电话');  },
            play:function (name) {
                console.log('打电话给:',name);
            }
    }
    //调用:  对象.属性  对象['属性']
    console.log(p1.name);
    console.log(p1.color);
    console.log(p1['size']);
    p1.send();
    p1['send']();
    p1.play('小明');
    p1['play']('小刚');






</script>